<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@include file="../header.jsp"%>
<script type="text/javascript" src="<%=basePath%>fckeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'content' ) ;
oFCKeditor.BasePath = "<%=basePath%>fckeditor/" ;
oFCKeditor.ToolbarSet = 'Default' ;
oFCKeditor.Height=400;
oFCKeditor.ReplaceTextarea() ;
}
</script>

<br />
<form id="form1" name="form1" method="post" action="<%=basePath%>blog.do?saveBlog">
	<table id="tab">
		<tr>
			<td>主题:</td>
			<td><input name="title" type="text" id="title" size="100" />
			</td>
		</tr>
		<tr>
			<td>分类:</td>
			<td>
			<select name="categoryId" id="categoryId">         
         <%
                  	List list = (List) request.getSession().getAttribute("categorys");
                  	if(list!=null){
                  	for (int i = 0; i < list.size(); i++) {
                  		Category c = (Category) list.get(i);
                  %>          
          	<option value="<%=c.getId()%>"><%=c.getName()%></option>          
         <%
                   	}}
                   %>          
        </select>
			<a href="<%=basePath%>/views/blog/addCategory.jsp">添加分类</a></td>
		</tr>
		<tr>
			<td colspan="2">内容: <br /> <textarea name="content" cols="100"
					rows="18" id="content"></textarea>
			</td>
		</tr>
		<tr>
			<td colspan="2"><input type="submit" name="submit" value="创建" />
			</td>
		</tr>
	</table>
</form>
<%@include file="../footer.jsp"%>